#ifndef EFFECTEDITWIDGET_H
#define EFFECTEDITWIDGET_H

#include <QWidget>
#include <QVector>
#include <QMap>
#include "Render/particlesystem.h"
namespace Ui {
class EffectEditWidget;
}

class EffectEditWidget : public QWidget
{
    Q_OBJECT

public:
    explicit EffectEditWidget(QWidget *parent = nullptr);
    ~EffectEditWidget();
    void SendInfo(QString name);
    QMap<QString,ParticleSystemInfo*> infos;
protected:
    virtual void dragEnterEvent(QDragEnterEvent *event);
    virtual void dropEvent(QDropEvent *event);
private:
    Ui::EffectEditWidget *ui;
    void InitDefaultEffect();
    void InitEffectListUI();
    void InitTextureListUI();
    void AddEffect(ParticleSystemInfo* info = nullptr);
    void DeleteEffect(QString name);
    void LoadEffect(int row);

    void AddTexture(QString path);
    void DeleteTexture();
    void LoadTexture();
    void Save();
    int nameId = 0;
    QVector<QString> whiteList;
};

#endif // EFFECTEDITWIDGET_H
